#pragma once

#include <Windows.h>
#include <gdiplus.h>

//+==================================================================+
class GraphicsFile
{
	Gdiplus::Bitmap*	image;
	BYTE*					data;
	int					width,
							height,
							bit_depth;

public:
//////////////////////////////////////////////////////////////////////

	GraphicsFile(LPCWSTR filename);
	GraphicsFile();
	~GraphicsFile();

//+------------------------------------------------------------------+
	BYTE			*getData()					{ return data;			}
	const BYTE	*getData()		const		{ return data;			}
	int			getWidth()		const		{ return width;		}
	int			getHeight()		const		{ return height;		}
	int			getBitDepth()	const		{ return bit_depth;	}

//+------------------------------------------------------------------+
	void readFile(LPCWSTR filename);

//+------------------------------------------------------------------+
//	alpha = 1 - alpha
	GraphicsFile &invertAlpha();
};
